package com.keensense.vcm.model;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

/**
 * @author lanjian
 * @date 2020/5/9 3:12 下午
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class Period {

    private Period() {
    }

    public Period(String startDate, String endDate, List<Range> ranges) {
        this.startDate = startDate;
        this.endDate = endDate;
        this.ranges = ranges;
    }

    /**
     * 开始日期，格式为yyyy-MM-DD
     */
    @XmlElement
    private String startDate;

    /**
     * 结束日期，格式为yyyy-MM-DD
     */
    @XmlElement
    private String endDate;

    /**
     * 客户端所在PC机时区与UTC—0时间的时间差（单位：分钟） 默认值为0 格式为：[-840~720]之间的整数 如：-480表示东八区，480表示西八区
     */
    private Integer timeZoneOffset;

    /**
     * 指定检索时间段列表
     */
    @XmlElementWrapper(name = "ranges")
    @XmlElement(name = "range")
    private List<Range> ranges;

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public Integer getTimeZoneOffset() {
        return timeZoneOffset;
    }

    public void setTimeZoneOffset(Integer timeZoneOffset) {
        this.timeZoneOffset = timeZoneOffset;
    }

    public List<Range> getRanges() {
        return ranges;
    }

    public void setRanges(List<Range> ranges) {
        this.ranges = ranges;
    }
}
